﻿

IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'medianamik_Type' AND COLUMN_NAME = 'IsAdmin')
ALTER TABLE dbo.medianamik_Type ADD
    IsAdmin BIT NOT NULL CONSTRAINT DF_medianamik_Type_IsAdmin DEFAULT 1


IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'medianamik_Property' AND COLUMN_NAME = 'RelationshipId')
ALTER TABLE dbo.medianamik_Property ADD
    RelationshipId INT NOT NULL CONSTRAINT DF_medianamik_Property_RelationshipId DEFAULT 0